package com.lzc.springcloud.authserver.domain;

import com.lzc.springcloud.authserver.infrastructure.utils.AssertionConcern;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.sql.Timestamp;

@MappedSuperclass
public class BasicEntity extends AssertionConcern {

    @Basic
    @Column(name = "status", nullable = true)
    private Byte status;

    @Basic
    @Column(name = "create_user_id", nullable = true)
    private Long createUserId;

    @Basic
    @Column(name = "create_time", nullable = true)
    private Timestamp createTime;

    protected BasicEntity() {
        super();
    }

    public Byte status() {
        return this.status;
    }

    public void setStatus(Byte status) {
        this.assertArgumentNotNull(status, "状态不能为空！");
        this.status = status;
    }

    public Long createUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.assertArgumentNotNull(createUserId, "创建人不能为空！");
        this.createUserId = createUserId;
    }

    public Timestamp createTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.assertArgumentNotNull(createTime, "创建时间不能为空！");
        this.createTime = createTime;
    }

}
